package net.sppan.base.service.impl;

import net.sppan.base.dao.support.IBaseDao;
import net.sppan.base.dao.IMgUserAwardDao;
import net.sppan.base.entity.mgEntity.MgUserAward;
import net.sppan.base.service.IMgUserAwardService;
import net.sppan.base.service.support.impl.BaseServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 用户账户表  服务实现类
 * </p>
 *
 * @author SPPan
 * @since 2016-12-28
 */
@Service
public class MgUserAwardServiceImpl extends BaseServiceImpl<MgUserAward, Integer> implements IMgUserAwardService {

	@Autowired
	private IMgUserAwardDao MgUserAwardDao;


	@Override
	public IBaseDao<MgUserAward, Integer> getBaseDao() {
		return this.MgUserAwardDao;
	}


	public void save(MgUserAward mgUserAward){
		  super.save(mgUserAward);
	}


	@Override
	public List<MgUserAward> findByUserIdAndSourceType(int userId, String sourceType) {
		return MgUserAwardDao.findByUserIdAndSourceType(userId,sourceType);
	}

	@Override
	public List<MgUserAward> findByUserId(int userId) {
		return MgUserAwardDao.findByUserId(userId);
	}
}
